<%@ page language="java" import="java.util.*" pageEncoding="utf8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
    <!-- 网页标题栏加上小图标-->
    <link rel="icon" href="images/favicon.ico" type="image/x-icon"/>
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/>
    <title>登录界面</title>

    <script type="text/javascript">
        function toReg() {
            document.getElementById("reg").src = "regist.jsp";
        }
        function toLogin() {
            document.getElementById("submit").src = "Login";
        }

    </script>

    <style type="text/css">
        font {
            color: white
        }

        #table1 {
            margin: 70px auto 0;
        }
    </style>
</head>

<body bgcolor="#FFFFCC">
<%
    if (request.getAttribute("msg") != null) {
        out.println("<script language=\"javascript\">alert('" + request.getAttribute("msg").toString() + "');</script>");
    }%>
<table>
    <tr>
        <td><img src="images/logo.png"/></td>
    </tr>
</table>

<table id="table1" width="800px" border="0" align="center" background="images/login_background.gif">
    <tr>
        <td width="30%" align="center">
            <form action="Login" name="form1" method="post">
                <table border="0">
                    <tr>
                        <td><font>用户名：</font></td>
                        <td><input name="userName" type="text" value="请输入英文名称"
                                   onfocus="if(this.value=='请输入英文名称'){this.value='';}"/></td>
                    </tr>
                    <tr>
                        <td><font>密&nbsp;&nbsp;码：</font></td>
                        <td align="left"><input name="userPwd" type="password"/></td>
                    </tr>
                    <tr>
                        <td align="right"><input name="rem" type="checkbox"/></td>
                        <td align="left"><font>记住我!</font></td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input id="submit" name="submit" type="image" value="登录" src="images/login_button2.png"
                                   onclick="toLogin();"/></td>
                    </tr>
                </table>
            </form>
        </td>

        <td width="30%" align="left">
            <table>
                <tr>
                    <td><img src="images/login_girl.png"/></td>
                </tr>
            </table>
        </td>

        <td width="40%" align="center">
            <form name="form2" action="regist.jsp" method="post">
                <table border="0">
                    <tr>
                        <td align="left"><font size="2"><b>如果您不是会员，请注册</b></font></td>
                    </tr>
                    <tr>
                        <td align="left"><font color="#FF9900" size="2">友情提示：</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">注册为会员可在本店购买商品</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">且注册之后您可以：</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">1. 保存您的个人资料</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">2. 收藏您关注的商品</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">3. 享受会员积分制度</font></td>
                    </tr>
                    <tr>
                        <td align="left"><font size="2">4. 订阅本店商品信息</font></td>
                    </tr>
                    <tr>
                        <td><input name="reg" id="reg" type="image" value="注册" src="images/login_button1.png" size="4"
                                   onclick="toReg()"/></td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
</table>
<p>&nbsp;</p>


<table align="center">
    <tr>
        <td align="right"><img src="images/comeon.gif"/></td>
    </tr>
</table>
</body>
</html>
